package democode.waitnotify.productconsume;

import org.junit.Test;


/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/28/2023 8:59 AM
 */
public class ProductConsumeTest {

    @Test
    public void test1() {
        Object object = new Object();
        Product product = new Product(object);
        Consume consume = new Consume(object);
        ProductThread productThread = new ProductThread(product);
        ConsumerThread consumerThread = new ConsumerThread(consume);
        productThread.start();
        consumerThread.start();
    }

    /**
     * product consume
     *
     * @param args 参数
     */
    public static void main(String[] args) {
        String value = "";
        Product product = new Product(value);
        Consume consume = new Consume(value);
        ProductThread productThread = new ProductThread(product);
        ConsumerThread consumerThread = new ConsumerThread(consume);
        productThread.start();
        consumerThread.start();
    }

}
